package com.ruoyi.pet.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.pet.mapper.PetPrescriptionMapper;
import com.ruoyi.pet.domain.PetPrescription;
import com.ruoyi.pet.service.IPetPrescriptionService;

/**
 * 处方Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-09-01
 */
@Service
public class PetPrescriptionServiceImpl implements IPetPrescriptionService 
{
    @Autowired
    private PetPrescriptionMapper petPrescriptionMapper;

    /**
     * 查询处方
     * 
     * @param id 处方主键
     * @return 处方
     */
    @Override
    public PetPrescription selectPetPrescriptionById(Long id)
    {
        return petPrescriptionMapper.selectPetPrescriptionById(id);
    }

    /**
     * 查询处方列表
     * 
     * @param petPrescription 处方
     * @return 处方
     */
    @Override
    public List<PetPrescription> selectPetPrescriptionList(PetPrescription petPrescription)
    {
        return petPrescriptionMapper.selectPetPrescriptionList(petPrescription);
    }

    /**
     * 新增处方
     * 
     * @param petPrescription 处方
     * @return 结果
     */
    @Override
    public int insertPetPrescription(PetPrescription petPrescription)
    {
        return petPrescriptionMapper.insertPetPrescription(petPrescription);
    }

    /**
     * 修改处方
     * 
     * @param petPrescription 处方
     * @return 结果
     */
    @Override
    public int updatePetPrescription(PetPrescription petPrescription)
    {
        return petPrescriptionMapper.updatePetPrescription(petPrescription);
    }

    /**
     * 批量删除处方
     * 
     * @param ids 需要删除的处方主键
     * @return 结果
     */
    @Override
    public int deletePetPrescriptionByIds(Long[] ids)
    {
        return petPrescriptionMapper.deletePetPrescriptionByIds(ids);
    }

    /**
     * 删除处方信息
     * 
     * @param id 处方主键
     * @return 结果
     */
    @Override
    public int deletePetPrescriptionById(Long id)
    {
        return petPrescriptionMapper.deletePetPrescriptionById(id);
    }
}
